Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check node type above custom update fn #2081

Merged

Conversation

thatsjonsense
Copy link
Contributor

This is a pretty simple one - I was running into a bunch of issues with the wrong NodeView component rendering for a node after I dragged it. After reading this issue on the ProseMirror forums https://discuss.prosemirror.net/t/nodeview-dragging-results-in-duplicates-bug/3962/2 I realized the culprit was my custom update function, which wasn't checking for node type.

I couldn't think of any reason why somebody would want a different node type's component to render, so I think it would help people avoid this bug to move the node type check above the custom update function running. Let me know what you think.

@philippkuehn
Copy link
Contributor

yeah, let’s do this! thanks!

@philippkuehn philippkuehn merged commit ddc9ca8 into ueberdosis:main Oct 25, 2021
andrewlu0 pushed a commit to trybaseplate/tiptap that referenced this pull request Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants